package dev.blogmoon.cn.common.enums;

import lombok.Getter;

import java.util.HashMap;
import java.util.Map;

public enum DeleteEnum {

    NOT_DELETE(0, "未删除"),
    DELETE(1, "删除"),
    ;
    @Getter
    private final int code;
    @Getter
    private final String msg;

    private static Map<Integer, DeleteEnum> map;

    static {
        map = new HashMap<>();
        for (DeleteEnum errorCodeEnum : DeleteEnum.values()) {
            map.put(errorCodeEnum.getCode(), errorCodeEnum);
        }
    }

    DeleteEnum(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }
}
